<template>
  <div class="my-tag" :style="{ background: bg }" @click="click">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'MyTag',
  props: {
    bg: {
      type: String,
      default: '#f4f4f4'
    }
  },
  methods: {
    click() {
      this.$emit('click')
    }
  }
}
</script>

<style lang="scss" scoped>
.my-tag {
  height: 0.3rem;
  width: 1rem;
  text-align: center;
  line-height: 0.3rem;
  border-radius: 0.04rem;
}
</style>